package com.hwua.service;

import com.hwua.entity.Product;
import com.hwua.entity.ProductCategory;

import java.util.List;

public interface IProductAllService {
    /**
     * 查询所有商品(根据库存排序)
     * @return
     * @throws Exception
     */
    public List<Product> queryAll() throws Exception;


    /**
     * 查询所有商品
     * @return
     * @throws Exception
     */
    public List<Product> queryA() throws Exception;

    /**
     * 分页
     * @param start
     * @param pageSize
     * @return
     * @throws Exception
     */

    public List<Product> queryAllForLimit( Integer start, Integer pageSize) throws Exception;

    /**
     * product的总数
     * @return
     * @throws Exception
     */
    public Long queryCount() throws Exception;

    /**
     * 根据id查找相关商品
     * @param minor_id 货号
     * @return
     * @throws Exception
     */
    public List<Product> queryById(int minor_id) throws Exception;

    /**
     * 根据id查找相关商品
     * @param id 商品本身id
     * @return
     * @throws Exception
     */
    public Product queryByProdId(int id) throws Exception;

    /**
     * 通过二级目录在product中找出二级目录id
     * @param minor_id
     * @return
     * @throws Exception
     */
    public Product queryByMinorID(int minor_id ) throws Exception;

    /**
     * 使用一级目录去查询所有值
     * @param Major_id
     * @return
     * @throws Exception
     */
    public List<Product> queryByMajor_id(int Major_id) throws Exception;
}
